<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="element">

</div>
<button id="add_btn">添加</button>
<button id="del_btn">删除</button>
<button id="css_btn">背景</button>

<script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
    $(function(){
        $("#add_btn").on("click",function(){
            $("#element").append("<p>我是一个元素</p>");
        });
        $("#del_btn").on("click",function(){
            //$("#element p:first").remove();
            $("#element").children().get(1).remove();

        });

        $("#css_btn").on("click",function(){
            var p = $("#element").children().get(1);
            $(p).css("background-color","red");
        });
    });

</script>

</body>
</html>